<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Event</title>
<script src="../src/js/YAHOO.js" type="text/javascript"></script>
<style type="text/css">
    #linkContainer {
        position: relative;
        padding: 10px;
        border: 1px solid #333333;
        height: 300px;
        width: 150px;
    }
</style>
<script type="text/javascript">

YAHOO.namespace("test");

YAHOO.test.Class1 = function(info) {
    alert("Class1: " + info);
};

YAHOO.test.Class1.prototype.testMethod = function(info) {
    alert("Class1: " + info);
};

YAHOO.test.Class2 = function(info) {
    // chain the constructors
    YAHOO.test.Class2.superclass.constructor.call(this, info);
    alert("Class2: " + info);
};

// Class2 extends Class1.  Must be done immediately after the Class2 constructor
YAHOO.extend(YAHOO.test.Class2, YAHOO.test.Class1);

YAHOO.test.Class2.prototype.testMethod = function(info) {
    // chain the method
    YAHOO.test.Class2.superclass.testMethod.call(this, info);
    alert("Class2: " + info);
};

var class2Instance = new YAHOO.test.Class2("constructor executed");
class2Instance.testMethod("testMethod invoked");

YAHOO.augment(YAHOO.test.Class2, YAHOO.blah);

</script>
<body>

<a href="javascript:;">Does nothing</a>
<div id="linkContainer">
  <h3>Header does nothing</h3>
</div>
<input id="addButton" type="button" value="Add link" />
</body>

</html>

